home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 April: Mac OS SDK / Dev.CD Apr 98 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / AIncludes / NetSprocket.a < prev    next >
Encoding:
Text File  |  1998-02-12  |  18.3 KB  |  619 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        NetSprocket.a
  3. ;
  4. ;    Contains:    Games Sprockets: NetSprocket interfaces
  5. ;
  6. ;    Version:    Technology:    NetSprocket 1.0.2
  7. ;                Release:    Universal Interfaces 3.1
  8. ;
  9. ;    Copyright:    © 1996-1998 by Apple Computer, Inc., all rights reserved.
  10. ;
  11. ;    Bugs?:        Please include the the file and version information (from above) with
  12. ;                the problem description.  Developers belonging to one of the Apple
  13. ;                developer programs can submit bug reports to:
  14. ;
  15. ;                    devsupport@apple.com
  16. ;
  17. ;
  18.     IF &TYPE('__NETSPROCKET__') = 'UNDEFINED' THEN
  19. __NETSPROCKET__ SET 1
  20.  
  21.     IF &TYPE('__CONDITIONALMACROS__') = 'UNDEFINED' THEN
  22.     include 'ConditionalMacros.a'
  23.     ENDIF
  24.  
  25.     IF TARGET_OS_MAC THEN
  26.     IF &TYPE('__MACTYPES__') = 'UNDEFINED' THEN
  27.     include 'MacTypes.a'
  28.     ENDIF
  29.     IF &TYPE('__EVENTS__') = 'UNDEFINED' THEN
  30.     include 'Events.a'
  31.     ENDIF
  32.     ENDIF    ; TARGET_OS_MAC
  33.     IF TARGET_OS_MAC THEN
  34.  
  35. kNSpMaxPlayerNameLen            EQU        31
  36. kNSpMaxGroupNameLen                EQU        31
  37. kNSpMaxPasswordLen                EQU        31
  38. kNSpMaxGameNameLen                EQU        31
  39. kNSpMaxDefinitionStringLen        EQU        255
  40.  
  41. ;  NetSprocket basic types 
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50. ; typedef SInt32                         NSpEventCode
  51.  
  52. ; typedef SInt32                         NSpGameID
  53.  
  54. ; typedef SInt32                         NSpPlayerID
  55.  
  56. ; typedef NSpPlayerID                     NSpGroupID
  57.  
  58. ; typedef UInt32                         NSpPlayerType
  59.  
  60. ; typedef SInt32                         NSpFlags
  61.  
  62. NSpPlayerName            RECORD 0
  63. f                         ds        Str31
  64. sizeof                     EQU *                    ; size:   $20 (32)
  65.                         ENDR
  66.  
  67.  
  68. ;  Individual player info 
  69. NSpPlayerInfo            RECORD 0
  70. id                         ds.l    1                ; offset: $0 (0)
  71. playerType                 ds.l    1                ; offset: $4 (4)        ;  "type" in C
  72. name                     ds        Str31            ; offset: $8 (8)
  73. groupCount                 ds.l    1                ; offset: $28 (40)
  74. groups                     ds.l    1                ; offset: $2C (44) <-- really an array of length one
  75. sizeof                     EQU *                    ; size:   $30 (48)
  76.                         ENDR
  77. ; typedef struct NSpPlayerInfo *        NSpPlayerInfoPtr
  78.  
  79. ;  list of all players 
  80. NSpPlayerEnumeration    RECORD 0
  81. count                     ds.l    1                ; offset: $0 (0)
  82. playerInfo                 ds.l    1                ; offset: $4 (4) <-- really an array of length one
  83. sizeof                     EQU *                    ; size:   $8 (8)
  84.                         ENDR
  85. ; typedef struct NSpPlayerEnumeration *    NSpPlayerEnumerationPtr
  86.  
  87. ;  Individual group info 
  88. NSpGroupInfo            RECORD 0
  89. id                         ds.l    1                ; offset: $0 (0)
  90. playerCount                 ds.l    1                ; offset: $4 (4)
  91. players                     ds.l    1                ; offset: $8 (8) <-- really an array of length one
  92. sizeof                     EQU *                    ; size:   $C (12)
  93.                         ENDR
  94. ; typedef struct NSpGroupInfo *            NSpGroupInfoPtr
  95.  
  96. ;  List of all groups 
  97. NSpGroupEnumeration        RECORD 0
  98. count                     ds.l    1                ; offset: $0 (0)
  99. groups                     ds.l    1                ; offset: $4 (4) <-- really an array of length one
  100. sizeof                     EQU *                    ; size:   $8 (8)
  101.                         ENDR
  102. ; typedef struct NSpGroupEnumeration *    NSpGroupEnumerationPtr
  103.  
  104. ;  Topology types 
  105. ; typedef UInt32                         NSpTopology
  106.  
  107.  
  108. kNSpClientServer                EQU        $00000001
  109. ;  Game information 
  110. NSpGameInfo                RECORD 0
  111. maxPlayers                 ds.l    1                ; offset: $0 (0)
  112. currentPlayers             ds.l    1                ; offset: $4 (4)
  113. currentGroups             ds.l    1                ; offset: $8 (8)
  114. topology                 ds.l    1                ; offset: $C (12)
  115. reserved                 ds.l    1                ; offset: $10 (16)
  116. name                     ds        Str31            ; offset: $14 (20)
  117. password                 ds        Str31            ; offset: $34 (52)
  118. sizeof                     EQU *                    ; size:   $54 (84)
  119.                         ENDR
  120. ;  Structure used for sending and receiving network messages 
  121. NSpMessageHeader        RECORD 0
  122. version                     ds.l    1                ; offset: $0 (0)        ;  Used by NetSprocket.  Don't touch this 
  123. what                     ds.l    1                ; offset: $4 (4)        ;  The kind of message (e.g. player joined) 
  124. from                     ds.l    1                ; offset: $8 (8)        ;  ID of the sender 
  125. toID                     ds.l    1                ; offset: $C (12)        ;  (player or group) id of the intended recipient (was "to) 
  126. id                         ds.l    1                ; offset: $10 (16)        ;  Unique ID for this message & (from) player 
  127. when                     ds.l    1                ; offset: $14 (20)        ;  Timestamp for the message 
  128. messageLen                 ds.l    1                ; offset: $18 (24)        ;  Bytes of data in the entire message (including the header) 
  129. sizeof                     EQU *                    ; size:   $1C (28)
  130.                         ENDR
  131. ;  NetSprocket-defined message structures 
  132. NSpErrorMessage            RECORD 0
  133. header                     ds        NSpMessageHeader ; offset: $0 (0)
  134. error                     ds.l    1                ; offset: $1C (28)
  135. sizeof                     EQU *                    ; size:   $20 (32)
  136.                         ENDR
  137. NSpJoinRequestMessage    RECORD 0
  138. header                     ds        NSpMessageHeader ; offset: $0 (0)
  139. name                     ds        Str31            ; offset: $1C (28)
  140. password                 ds        Str31            ; offset: $3C (60)
  141. theType                     ds.l    1                ; offset: $5C (92)
  142. customDataLen             ds.l    1                ; offset: $60 (96)
  143. customData                 ds.b    1                ; offset: $64 (100) <-- really an array of length one
  144.                          ORG 102
  145. sizeof                     EQU *                    ; size:   $66 (102)
  146.                         ENDR
  147. NSpJoinApprovedMessage    RECORD 0
  148. header                     ds        NSpMessageHeader ; offset: $0 (0)
  149. sizeof                     EQU *                    ; size:   $1C (28)
  150.                         ENDR
  151. NSpJoinDeniedMessage    RECORD 0
  152. header                     ds        NSpMessageHeader ; offset: $0 (0)
  153. reason                     ds        Str255            ; offset: $1C (28)
  154. sizeof                     EQU *                    ; size:   $11C (284)
  155.                         ENDR
  156. NSpPlayerJoinedMessage    RECORD 0
  157. header                     ds        NSpMessageHeader ; offset: $0 (0)
  158. playerCount                 ds.l    1                ; offset: $1C (28)
  159. playerInfo                 ds        NSpPlayerInfo    ; offset: $20 (32)
  160. sizeof                     EQU *                    ; size:   $50 (80)
  161.                         ENDR
  162. NSpPlayerLeftMessage    RECORD 0
  163. header                     ds        NSpMessageHeader ; offset: $0 (0)
  164. playerCount                 ds.l    1                ; offset: $1C (28)
  165. playerID                 ds.l    1                ; offset: $20 (32)
  166. playerName                 ds        NSpPlayerName    ; offset: $24 (36)
  167. sizeof                     EQU *                    ; size:   $44 (68)
  168.                         ENDR
  169. NSpHostChangedMessage    RECORD 0
  170. header                     ds        NSpMessageHeader ; offset: $0 (0)
  171. newHost                     ds.l    1                ; offset: $1C (28)
  172. sizeof                     EQU *                    ; size:   $20 (32)
  173.                         ENDR
  174. NSpGameTerminatedMessage RECORD 0
  175. header                     ds        NSpMessageHeader ; offset: $0 (0)
  176. sizeof                     EQU *                    ; size:   $1C (28)
  177.                         ENDR
  178. ;  Different kinds of messages.  These can NOT be bitwise ORed together 
  179.  
  180. kNSpSendFlag_Junk                EQU        $00100000            ; will be sent (try once) when there is nothing else pending 
  181. kNSpSendFlag_Normal                EQU        $00200000            ; will be sent immediately (try once) 
  182. kNSpSendFlag_Registered            EQU        $00400000            ; will be sent immediately (guaranteed, in order) 
  183.  
  184. ;  Options for message delivery.  These can be bitwise ORed together with each other,
  185. ;        as well as with ONE of the above 
  186.  
  187. kNSpSendFlag_FailIfPipeFull        EQU        $00000001
  188. kNSpSendFlag_SelfSend            EQU        $00000002
  189. kNSpSendFlag_Blocking            EQU        $00000004
  190.  
  191. ;  Options for Hosting Joining, and Deleting games 
  192.  
  193. kNSpGameFlag_DontAdvertise        EQU        $00000001
  194. kNSpGameFlag_ForceTerminateGame    EQU        $00000002
  195. ;  Message "what" types 
  196. ;  Apple reserves all negative "what" values (anything with bit 32 set) 
  197.  
  198. kNSpSystemMessagePrefix            EQU        $80000000
  199. kNSpError                        EQU        $FFFFFFFF
  200. kNSpJoinRequest                    EQU        $80000001
  201. kNSpJoinApproved                EQU        $80000002
  202. kNSpJoinDenied                    EQU        $80000003
  203. kNSpPlayerJoined                EQU        $80000004
  204. kNSpPlayerLeft                    EQU        $80000005
  205. kNSpHostChanged                    EQU        $80000006
  206. kNSpGameTerminated                EQU        $80000007
  207.  
  208. ;  Special TPlayerIDs  for sending messages 
  209.  
  210. kNSpAllPlayers                    EQU        $00000000
  211. kNSpHostOnly                    EQU        $FFFFFFFF
  212.  
  213. ;  NetSprocket Error Codes 
  214.  
  215. kNSpInitializationFailedErr        EQU        -30360
  216. kNSpAlreadyInitializedErr        EQU        -30361
  217. kNSpTopologyNotSupportedErr        EQU        -30362
  218. kNSpPipeFullErr                    EQU        -30364
  219. kNSpHostFailedErr                EQU        -30365
  220. kNSpProtocolNotAvailableErr        EQU        -30366
  221. kNSpInvalidGameRefErr            EQU        -30367
  222. kNSpInvalidParameterErr            EQU        -30369
  223. kNSpOTNotPresentErr                EQU        -30370
  224. kNSpOTVersionTooOldErr            EQU        -30371
  225. kNSpMemAllocationErr            EQU        -30373
  226. kNSpAlreadyAdvertisingErr        EQU        -30374
  227. kNSpNotAdvertisingErr            EQU        -30376
  228. kNSpInvalidAddressErr            EQU        -30377
  229. kNSpFreeQExhaustedErr            EQU        -30378
  230. kNSpRemovePlayerFailedErr        EQU        -30379
  231. kNSpAddressInUseErr                EQU        -30380
  232. kNSpFeatureNotImplementedErr    EQU        -30381
  233. kNSpNameRequiredErr                EQU        -30382
  234. kNSpInvalidPlayerIDErr            EQU        -30383
  235. kNSpInvalidGroupIDErr            EQU        -30384
  236. kNSpNoPlayersErr                EQU        -30385
  237. kNSpNoGroupsErr                    EQU        -30386
  238. kNSpNoHostVolunteersErr            EQU        -30387
  239. kNSpCreateGroupFailedErr        EQU        -30388
  240. kNSpAddPlayerFailedErr            EQU        -30389
  241. kNSpInvalidDefinitionErr        EQU        -30390
  242. kNSpInvalidProtocolRefErr        EQU        -30391
  243. kNSpInvalidProtocolListErr        EQU        -30392
  244. kNSpTimeoutErr                    EQU        -30393
  245. kNSpGameTerminatedErr            EQU        -30394
  246. kNSpConnectFailedErr            EQU        -30395
  247. kNSpSendFailedErr                EQU        -30396
  248. kNSpJoinFailedErr                EQU        -30399
  249.  
  250.  
  251.  
  252. ; ************************  Initialization  ***********************
  253. ;
  254. ; extern OSStatus NSpInitialize(UInt32 inStandardMessageSize, UInt32 inBufferSize, UInt32 inQElements, NSpGameID inGameID, UInt32 inTimeout)
  255. ;
  256.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  257.         IMPORT_CFM_FUNCTION NSpInitialize
  258.     ENDIF
  259.  
  260.  
  261.  
  262.  
  263. ; **************************  Protocols  *************************
  264. ;  Programmatic protocol routines 
  265. ;
  266. ; extern OSStatus NSpProtocol_New(const char *inDefinitionString, NSpProtocolReference *outReference)
  267. ;
  268.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  269.         IMPORT_CFM_FUNCTION NSpProtocol_New
  270.     ENDIF
  271.  
  272. ;
  273. ; extern void NSpProtocol_Dispose(NSpProtocolReference inProtocolRef)
  274. ;
  275.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  276.         IMPORT_CFM_FUNCTION NSpProtocol_Dispose
  277.     ENDIF
  278.  
  279. ;
  280. ; extern OSStatus NSpProtocol_ExtractDefinitionString(NSpProtocolReference inProtocolRef, char *outDefinitionString)
  281. ;
  282.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  283.         IMPORT_CFM_FUNCTION NSpProtocol_ExtractDefinitionString
  284.     ENDIF
  285.  
  286.  
  287. ;  Protocol list routines 
  288. ;
  289. ; extern OSStatus NSpProtocolList_New(NSpProtocolReference inProtocolRef, NSpProtocolListReference *outList)
  290. ;
  291.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  292.         IMPORT_CFM_FUNCTION NSpProtocolList_New
  293.     ENDIF
  294.  
  295. ;
  296. ; extern void NSpProtocolList_Dispose(NSpProtocolListReference inProtocolList)
  297. ;
  298.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  299.         IMPORT_CFM_FUNCTION NSpProtocolList_Dispose
  300.     ENDIF
  301.  
  302. ;
  303. ; extern OSStatus NSpProtocolList_Append(NSpProtocolListReference inProtocolList, NSpProtocolReference inProtocolRef)
  304. ;
  305.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  306.         IMPORT_CFM_FUNCTION NSpProtocolList_Append
  307.     ENDIF
  308.  
  309. ;
  310. ; extern OSStatus NSpProtocolList_Remove(NSpProtocolListReference inProtocolList, NSpProtocolReference inProtocolRef)
  311. ;
  312.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  313.         IMPORT_CFM_FUNCTION NSpProtocolList_Remove
  314.     ENDIF
  315.  
  316. ;
  317. ; extern OSStatus NSpProtocolList_RemoveIndexed(NSpProtocolListReference inProtocolList, UInt32 inIndex)
  318. ;
  319.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  320.         IMPORT_CFM_FUNCTION NSpProtocolList_RemoveIndexed
  321.     ENDIF
  322.  
  323. ;
  324. ; extern UInt32 NSpProtocolList_GetCount(NSpProtocolListReference inProtocolList)
  325. ;
  326.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  327.         IMPORT_CFM_FUNCTION NSpProtocolList_GetCount
  328.     ENDIF
  329.  
  330. ;
  331. ; extern NSpProtocolReference NSpProtocolList_GetIndexedRef(NSpProtocolListReference inProtocolList, UInt32 inIndex)
  332. ;
  333.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  334.         IMPORT_CFM_FUNCTION NSpProtocolList_GetIndexedRef
  335.     ENDIF
  336.  
  337.  
  338. ;  Helpers 
  339. ;
  340. ; extern NSpProtocolReference NSpProtocol_CreateAppleTalk(ConstStr31Param inNBPName, ConstStr31Param inNBPType, UInt32 inMaxRTT, UInt32 inMinThruput)
  341. ;
  342.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  343.         IMPORT_CFM_FUNCTION NSpProtocol_CreateAppleTalk
  344.     ENDIF
  345.  
  346. ;
  347. ; extern NSpProtocolReference NSpProtocol_CreateIP(InetPort inPort, UInt32 inMaxRTT, UInt32 inMinThruput)
  348. ;
  349.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  350.         IMPORT_CFM_FUNCTION NSpProtocol_CreateIP
  351.     ENDIF
  352.  
  353.  
  354. ; ***********************  Human Interface  ***********************
  355. ;
  356. ; extern NSpAddressReference NSpDoModalJoinDialog(ConstStr31Param inGameType, ConstStr255Param inEntityListLabel, Str31 ioName, Str31 ioPassword, NSpEventProcPtr inEventProcPtr)
  357. ;
  358.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  359.         IMPORT_CFM_FUNCTION NSpDoModalJoinDialog
  360.     ENDIF
  361.  
  362. ;
  363. ; extern Boolean NSpDoModalHostDialog(NSpProtocolListReference ioProtocolList, Str31 ioGameName, Str31 ioPlayerName, Str31 ioPassword, NSpEventProcPtr inEventProcPtr)
  364. ;
  365.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  366.         IMPORT_CFM_FUNCTION NSpDoModalHostDialog
  367.     ENDIF
  368.  
  369.  
  370. ; *********************  Hosting and Joining  *********************
  371. ;
  372. ; extern OSStatus NSpGame_Host(NSpGameReference *outGame, NSpProtocolListReference inProtocolList, UInt32 inMaxPlayers, ConstStr31Param inGameName, ConstStr31Param inPassword, ConstStr31Param inPlayerName, NSpPlayerType inPlayerType, NSpTopology inTopology, NSpFlags inFlags)
  373. ;
  374.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  375.         IMPORT_CFM_FUNCTION NSpGame_Host
  376.     ENDIF
  377.  
  378. ;
  379. ; extern OSStatus NSpGame_Join(NSpGameReference *outGame, NSpAddressReference inAddress, ConstStr31Param inName, ConstStr31Param inPassword, NSpPlayerType inType, void *inCustomData, UInt32 inCustomDataLen, NSpFlags inFlags)
  380. ;
  381.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  382.         IMPORT_CFM_FUNCTION NSpGame_Join
  383.     ENDIF
  384.  
  385. ;
  386. ; extern OSStatus NSpGame_EnableAdvertising(NSpGameReference inGame, NSpProtocolReference inProtocol, Boolean inEnable)
  387. ;
  388.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  389.         IMPORT_CFM_FUNCTION NSpGame_EnableAdvertising
  390.     ENDIF
  391.  
  392. ;
  393. ; extern OSStatus NSpGame_Dispose(NSpGameReference inGame, NSpFlags inFlags)
  394. ;
  395.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  396.         IMPORT_CFM_FUNCTION NSpGame_Dispose
  397.     ENDIF
  398.  
  399. ;
  400. ; extern OSStatus NSpGame_GetInfo(NSpGameReference inGame, NSpGameInfo *ioInfo)
  401. ;
  402.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  403.         IMPORT_CFM_FUNCTION NSpGame_GetInfo
  404.     ENDIF
  405.  
  406. ; **************************  Messaging  *************************
  407. ;
  408. ; extern OSStatus NSpMessage_Send(NSpGameReference inGame, NSpMessageHeader *inMessage, NSpFlags inFlags)
  409. ;
  410.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  411.         IMPORT_CFM_FUNCTION NSpMessage_Send
  412.     ENDIF
  413.  
  414. ;
  415. ; extern NSpMessageHeader *NSpMessage_Get(NSpGameReference inGame)
  416. ;
  417.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  418.         IMPORT_CFM_FUNCTION NSpMessage_Get
  419.     ENDIF
  420.  
  421. ;
  422. ; extern void NSpMessage_Release(NSpGameReference inGame, NSpMessageHeader *inMessage)
  423. ;
  424.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  425.         IMPORT_CFM_FUNCTION NSpMessage_Release
  426.     ENDIF
  427.  
  428. ;  Helpers 
  429. ;
  430. ; extern OSStatus NSpMessage_SendTo(NSpGameReference inGame, NSpPlayerID inTo, SInt32 inWhat, void *inData, UInt32 inDataLen, NSpFlags inFlags)
  431. ;
  432.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  433.         IMPORT_CFM_FUNCTION NSpMessage_SendTo
  434.     ENDIF
  435.  
  436.  
  437. ; *********************  Player Information  *********************
  438. ;
  439. ; extern NSpPlayerID NSpPlayer_GetMyID(NSpGameReference inGame)
  440. ;
  441.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  442.         IMPORT_CFM_FUNCTION NSpPlayer_GetMyID
  443.     ENDIF
  444.  
  445. ;
  446. ; extern OSStatus NSpPlayer_GetInfo(NSpGameReference inGame, NSpPlayerID inPlayerID, NSpPlayerInfoPtr *outInfo)
  447. ;
  448.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  449.         IMPORT_CFM_FUNCTION NSpPlayer_GetInfo
  450.     ENDIF
  451.  
  452. ;
  453. ; extern void NSpPlayer_ReleaseInfo(NSpGameReference inGame, NSpPlayerInfoPtr inInfo)
  454. ;
  455.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  456.         IMPORT_CFM_FUNCTION NSpPlayer_ReleaseInfo
  457.     ENDIF
  458.  
  459. ;
  460. ; extern OSStatus NSpPlayer_GetEnumeration(NSpGameReference inGame, NSpPlayerEnumerationPtr *outPlayers)
  461. ;
  462.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  463.         IMPORT_CFM_FUNCTION NSpPlayer_GetEnumeration
  464.     ENDIF
  465.  
  466. ;
  467. ; extern void NSpPlayer_ReleaseEnumeration(NSpGameReference inGame, NSpPlayerEnumerationPtr inPlayers)
  468. ;
  469.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  470.         IMPORT_CFM_FUNCTION NSpPlayer_ReleaseEnumeration
  471.     ENDIF
  472.  
  473. ;
  474. ; extern UInt32 NSpPlayer_GetRoundTripTime(NSpGameReference inGame, NSpPlayerID inPlayer)
  475. ;
  476.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  477.         IMPORT_CFM_FUNCTION NSpPlayer_GetRoundTripTime
  478.     ENDIF
  479.  
  480. ;
  481. ; extern UInt32 NSpPlayer_GetThruput(NSpGameReference inGame, NSpPlayerID inPlayer)
  482. ;
  483.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  484.         IMPORT_CFM_FUNCTION NSpPlayer_GetThruput
  485.     ENDIF
  486.  
  487.  
  488. ; *********************  Group Management  *********************
  489. ;
  490. ; extern OSStatus NSpGroup_New(NSpGameReference inGame, NSpGroupID *outGroupID)
  491. ;
  492.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  493.         IMPORT_CFM_FUNCTION NSpGroup_New
  494.     ENDIF
  495.  
  496. ;
  497. ; extern OSStatus NSpGroup_Dispose(NSpGameReference inGame, NSpGroupID inGroupID)
  498. ;
  499.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  500.         IMPORT_CFM_FUNCTION NSpGroup_Dispose
  501.     ENDIF
  502.  
  503. ;
  504. ; extern OSStatus NSpGroup_AddPlayer(NSpGameReference inGame, NSpGroupID inGroupID, NSpPlayerID inPlayerID)
  505. ;
  506.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  507.         IMPORT_CFM_FUNCTION NSpGroup_AddPlayer
  508.     ENDIF
  509.  
  510. ;
  511. ; extern OSStatus NSpGroup_RemovePlayer(NSpGameReference inGame, NSpGroupID inGroupID, NSpPlayerID inPlayerID)
  512. ;
  513.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  514.         IMPORT_CFM_FUNCTION NSpGroup_RemovePlayer
  515.     ENDIF
  516.  
  517. ;
  518. ; extern OSStatus NSpGroup_GetInfo(NSpGameReference inGame, NSpGroupID inGroupID, NSpGroupInfoPtr *outInfo)
  519. ;
  520.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  521.         IMPORT_CFM_FUNCTION NSpGroup_GetInfo
  522.     ENDIF
  523.  
  524. ;
  525. ; extern void NSpGroup_ReleaseInfo(NSpGameReference inGame, NSpGroupInfoPtr inInfo)
  526. ;
  527.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  528.         IMPORT_CFM_FUNCTION NSpGroup_ReleaseInfo
  529.     ENDIF
  530.  
  531. ;
  532. ; extern OSStatus NSpGroup_GetEnumeration(NSpGameReference inGame, NSpGroupEnumerationPtr *outGroups)
  533. ;
  534.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  535.         IMPORT_CFM_FUNCTION NSpGroup_GetEnumeration
  536.     ENDIF
  537.  
  538. ;
  539. ; extern void NSpGroup_ReleaseEnumeration(NSpGameReference inGame, NSpGroupEnumerationPtr inGroups)
  540. ;
  541.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  542.         IMPORT_CFM_FUNCTION NSpGroup_ReleaseEnumeration
  543.     ENDIF
  544.  
  545.  
  546. ; **************************  Utilities  **************************
  547. ;
  548. ; extern NumVersion NSpGetVersion(void )
  549. ;
  550.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  551.         IMPORT_CFM_FUNCTION NSpGetVersion
  552.     ENDIF
  553.  
  554. ;
  555. ; extern void NSpClearMessageHeader(NSpMessageHeader *inMessage)
  556. ;
  557.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  558.         IMPORT_CFM_FUNCTION NSpClearMessageHeader
  559.     ENDIF
  560.  
  561. ;
  562. ; extern UInt32 NSpGetCurrentTimeStamp(NSpGameReference inGame)
  563. ;
  564.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  565.         IMPORT_CFM_FUNCTION NSpGetCurrentTimeStamp
  566.     ENDIF
  567.  
  568. ;
  569. ; extern NSpAddressReference NSpConvertOTAddrToAddressReference(OTAddress *inAddress)
  570. ;
  571.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  572.         IMPORT_CFM_FUNCTION NSpConvertOTAddrToAddressReference
  573.     ENDIF
  574.  
  575. ;
  576. ; extern OTAddress *NSpConvertAddressReferenceToOTAddr(NSpAddressReference inAddress)
  577. ;
  578.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  579.         IMPORT_CFM_FUNCTION NSpConvertAddressReferenceToOTAddr
  580.     ENDIF
  581.  
  582. ;
  583. ; extern void NSpReleaseAddressReference(NSpAddressReference inAddress)
  584. ;
  585.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  586.         IMPORT_CFM_FUNCTION NSpReleaseAddressReference
  587.     ENDIF
  588.  
  589.  
  590. ; ************************ Advanced/Async routines ***************
  591. ;
  592. ; extern OSStatus NSpInstallCallbackHandler(NSpCallbackProcPtr inHandler, void *inContext)
  593. ;
  594.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  595.         IMPORT_CFM_FUNCTION NSpInstallCallbackHandler
  596.     ENDIF
  597.  
  598.  
  599. ;
  600. ; extern OSStatus NSpInstallJoinRequestHandler(NSpJoinRequestHandlerProcPtr inHandler, void *inContext)
  601. ;
  602.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  603.         IMPORT_CFM_FUNCTION NSpInstallJoinRequestHandler
  604.     ENDIF
  605.  
  606.  
  607. ;
  608. ; extern OSStatus NSpInstallAsyncMessageHandler(NSpMessageHandlerProcPtr inHandler, void *inContext)
  609. ;
  610.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  611.         IMPORT_CFM_FUNCTION NSpInstallAsyncMessageHandler
  612.     ENDIF
  613.  
  614.  
  615.  
  616.     ENDIF    ; TARGET_OS_MAC
  617.     ENDIF ; __NETSPROCKET__ 
  618.  
  619.